// 根据老的state和action返回新的state

export default function count(state=10,action){
    console.log('reducer',state,action.data)
    switch(action.type){
        case 'increment':
            return state+action.data;
        case 'decrement':
            return state-action.data;
        default:
            return state;
    }
}